<header>
<div style="height:45px;background-color:rgb(74,74,74);line-height:45px;color:#eee;">
	<div class="container">
		<span style="font-size:12px;">本店主营澳洲产品代购，100%原装正品，100%澳洲直邮，墨尔本代购诚信服务。</span>

		<ul id="login-menus"  class="{{if empty($CurrentUser)}}hidden{{/if}} nav navbar-nav pull-right">  
			<li class="dropdown">
				 {{$this->Html->link('<span id="login-user-name">'.$CurrentUser['username'].'</span><b class="caret"></b>', '#', array('title' => 'view your account',"class"=>"dropdown-toggle","data-toggle"=>"dropdown",'escape'=>false)); }}
				 <ul class="dropdown-menu">
				
				 	<li><?php echo $this->Html->link('<i class="glyphicon glyphicon-user"></i> '.__('Edit Profile'), array('controller' => 'users','action'=>'edit','plugin' => null ,),array('escape'=>false,)); ?></li>
					<li><?php echo $this->Html->link('<i class="glyphicon glyphicon-asterisk"></i> '.__('Edit Password'), array('controller' => 'users','action'=>'editpassword','plugin' => null ,),array('escape'=>false)); ?></li>
                    <li><?php echo $this->Html->link('<i class="glyphicon glyphicon-folder-close"></i> '.__('My Orders'), array('controller' => 'orders','action'=>'mine','plugin' => null ,),array('escape'=>false)); ?></li>                          
                        
					<li><?php echo $this->Html->link(__('<i class="glyphicon glyphicon-map-marker"></i> '.__('My addresses')), array('controller' => 'orders','action'=>'edit_consignee','plugin' => null ),array('escape'=>false)); ?></li>
                       
                    <li>{{$this->Html->link('<i class="glyphicon glyphicon-log-out"></i> '.__('Logout'), '/users/logout', array('title' => __('Logout'),'escape'=>false))}}</li> 
				</ul>
			</li>
			
		</ul>
		<ul id="login-links" class="{{if !empty($CurrentUser)}}hidden{{/if}} nav navbar-nav pull-right">  
			<?php $oauthlogin = $this->Hook->call('oauthLoginLink'); ?>
			{{if $oauthlogin}}
				<li class="dropdown">
				{{eval echo $this->Html->link(__('Login').'<b class="caret"></b>', array(				
					'controller' => 'users', 'action' => 'login'				
				),array('onclick'=>"return checkLogin();","class"=>"dropdown-toggle","data-toggle"=>"dropdown",'escape'=>false)); }}
					<ul class="dropdown-menu">
						{{$oauthlogin}}	
					</ul>
				</li>
			{{else}}
				<li>
				{{eval echo $this->Html->link(__('Login'), array(				
					'controller' => 'users', 'action' => 'login'			
				),array('onclick'=>"return publishController.open_dialog(this.href,{title:'".__('Login')."',selector:'#login-form',width:550});")); }}
				</li>
			{{/if}}
			<li>
			{{eval echo $this->Html->link(__('Register'), array(
				'controller' => 'users', 'action' => 'register'
			),array('target'=>'_blank',)); }}
			</li>
		  </ul>
	</div>
</div>

<div class="container">
	<div class="clearfix"  style="margin-top:40px;margin-bottom:25px;">
		<div class="navbar-header col-sm-3">
		  <a href="{{$this->Html->url(Configure::read('Site.logo_url'))}}" style="padding:0px 15px;" class="navbar-brand">{{$this->Html->image($this->Html->url(Configure::read('Site.logo')), array('style'=>'height:50px;','title' => $site[title],'alt' => $site[title]))}}</a>
		</div>
		<div class=" col-sm-6">
			<form method="get" action="{{$this->Html->url('/search/index')}}"  style="margin-top:10px">
					<div class="form-group" style="position:relative;">
						<input type="text" name="wd" style="padding-right:20px;" class="form-control" id="searchwd" placeholder="输入搜索词">
						<button type="submit" style="position: absolute;color:#ffd401;right: 5px;top: 8px; border: 0 none; background: transparent;"><i class="fa fa-search"></i></button>
					</div>
			</form>
		</div>
		<div class="col-sm-3"> 
			<div class="pull-right">
			{{$this->Html->link('MY CART<span id="shopping-cart-num"></span>','/carts/listcart.html',array('escape'=>false))}}
			<img src="http://meldger.oss-cn-hongkong.aliyuncs.com/bag.png">
			</div>
		</div>
	</div>
	
	<div class="clearfix">
	<nav class="bs-navbar-collapse" role="navigation">
	<?php 
		if(empty($top_category_id)) $top_category_id=0;
	echo $this->Section->getNavMenu('Category',
		array(
			'selectedid'=> $top_category_id,
			'ulAttributes'=>array('class'=>'nav navbar-nav'),
                        'defaultClass'=>'ui-state-default',
			'preli'=>'<li class="dropdown" id="all-product-categeries"><a href="#"><i class="fa fa-list"></i> 全部商品分类</a><ul></ul></li>',
			'sufli'=>'',
			'maxdepth' => 1,
		),$site_cate_id
	);
	?>
		
    </nav>
	</div>
</div>
</header>
